import fetchApi from "@/utils/request"
export default {
    //用户登陆
    userLogin(params) {
        return fetchApi("/api/v1/admin/login/by", "POST", params)
    },
    //微信授权登录
    userLogin2(params) {
        return fetchApi("/api/v1/user/wechat/oauth", "POST", params)
    },
    //用户注册
    userRegister(params) {
        return fetchApi("/api/v1/admin/account/register", "POST", params)
    },
    //获取用户信息
    getUserInfo() {
        return fetchApi("/api/v1/admin/info", "GET", {})
    },
    //退出登录
    logout() {
        return fetchApi("/api/v1/admin/logout", "POST", {})
    },
    //获取手机验证码
    getMobileCode(params) {
        return fetchApi("/api/v1/admin/mobile/code", "POST", params)
    },
    //微信授权
    getWechatUrl(params) {
        return fetchApi("/api/v1/user/wechat/oauth", "GET", params)
    }
}
